<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<html>
<head>
<base href="${_ctx}">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>商品列表</title>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="zi" uri="http://gson.cn/jsp/jstl/mytags"%>
<link rel="stylesheet" href="static/css/ht-splb.css" />
</head>
<body>
	<div class="main">
		<div class="nav">
			<jsp:include page="/WEB-INF/jsp/nav.jsp">
				<jsp:param value="1" name="index" />
			</jsp:include>
		</div>
		
		<div class="bor">
			<div class="list-t">
				<a href="admin-order">ECSHOP</a>-商品列表
				
				<a class="dj" href="#">添加新商品</a>
			</div>

			<div class="list-b">
				
				<select class="pl">
					<option>批量操作</option>
					<option>确认</option>
					<option>取消</option>
					<option>移出</option>
				</select>
				
				<select class="lb" name="lb">
					<option>类别</option>
					
					<c:forEach items="${lb}" var="l">
					<option>${l.leibie_name }</option>
					</c:forEach>

				</select> <select class="pp" name="pp">
					<option>品牌</option>
					<c:forEach items="${pp}" var="p">
					<option>${p.pingpai_name}</option>
					</c:forEach>

				</select> <select class="g1" name="g1">
					<option>状态</option>
					<option>上架</option>
					<option>下架</option>
				</select> 
<!-- 				<select class="g2" name="g2">
					<option>全部</option>
					<option>精品</option>
					<option>新品</option>
					<option>热销</option>
				</select> -->

				<!-- <button class="sub" id="sx">筛选</button> -->

				<input type="text" placeholder=" 请输入商品关键字" name="txt" class="txt">

				<button class="sub">搜索</button>
			</div>

			<div class="tab">
				<table  cellpadding="0" cellspacing="0"
					style="border-collapse: collapse;" border="0">
					<thead class="th">
						<tr align="center">
							<td width="50px"><input type="checkbox" class="chb"></td>
							<td width="100px">缩略图</td>
							<td width="180px" align="left">商品名称</td>
							<td width="100px">货号</td>
							<td width="100px">价格</td>
							<td width="70px">上架</td>
							<td width="70px">精品</td>
							<td width="70px">新品</td>
							<td width="70px">热销</td>
							<td width="70px">库存</td>
							<td width="150px">操作</td>
						</tr>
					</thead>

					<tbody class="tb">
					<c:forEach items="${ggg.rows}" var="list">
						<tr align="center">
							<td><input type="checkbox" class="chb"></td>
							<td><img src="${list.picture_path}"></td>
							<td style="font-size: 12px">${list.shoop_Product}</td>
							<td>${list.shoop_Id}</td>
							<td>￥${list.shoop_price}</td>
							<td></td>
							<td></td>
							<td></td>
							<td></td>
							<td>${list.shoop_Inventory }</td>
							<td></td>
						</tr>
						</c:forEach>
					</tbody>
				</table>
				<div class="minfenye"><zi:page pages="${ggg}" url="admin-index"></zi:page></div>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript" src="static/js/jquery-3.1.0.js"></script>
	<script type="text/javascript">
		$(function(){
/* 			$("#sx").click(function(){
				var lb = '${param.lb}';
				var pp = '${param.pp}';
				var g1 = '${param.g1}';
				var g2 = '${param.g2}';
				console.log("admin-index?lb="+lb+"&pp="+pp+"&g1="+g1+"&g2="+g2);
				location.href="admin-index?lb="+lb+"&pp="+pp+"&g1="+g1+"&g2="+g2;
			}); */
			$(".lb").change(function(){
				var lb = $(this).val();
				var pp = '${param.pp}';
				var g1 = '${param.g1}';
				console.log("admin-index?lb="+lb+"&pp="+pp+"&g1="+g1);
				location.href="admin-index?lb="+lb+"&pp="+pp+"&g1="+g1;
			});
			$(".pp").change(function(){
				var lb = '${param.lb}';
				var pp =  $(this).val();
				var g1 = '${param.g1}';
				console.log("admin-index?lb="+lb+"&pp="+pp+"&g1="+g1);
				location.href="admin-index?lb="+lb+"&pp="+pp+"&g1="+g1;
			});
			
			$(".g1").change(function(){
				var lb = '${param.lb}';
				var pp = '${param.pp}';
				var g1 =  $(this).val();
				console.log("admin-index?lb="+lb+"&pp="+pp+"&g1="+g1);
				location.href="admin-index?lb="+lb+"&pp="+pp+"&g1="+g1;
			});
			
/* 			$(".sub").click(function(){
				var lb = '${param.lb}';
				var pp = '${param.pp}';
				var gjz = $('.txt').val();
				console.log("admin-index?);
			}); */
			
/* 			$(".g2").change(function(){
				var lb = '${param.lb}';
				var pp = '${param.pp}';
				var g1 = '${param.g1}';
				var g2 = $(this).val();
				console.log("admin-index?lb="+lb+"&pp="+pp+"&g1="+g1+"&g2="+g2);
				location.href="admin-index?lb="+lb+"&pp="+pp+"&g1="+g1+"&g2="+g2;
			}); */
		});
		
	</script>
</html>
